package generator.service;

import generator.domain.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author 李展鹏
* @description 针对表【t_sys_user(系统用户)】的数据库操作Service
* @createDate 2024-04-25 13:57:11
*/
@Transactional
public interface SysUserService extends IService<SysUser> {
    //实现登录功能
    public SysUser login(String account);

    /**
     * 条件查询
     * @param queryRealName
     * @param queryRoleId
     * @return
     */
    public int getUserCount(String queryRealName,Integer queryRoleId);

    /**
     * 分页
     * @param queryRealName
     * @param queryRoleId
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public List<SysUser> getUserList( String queryRealName, Integer queryRoleId,Integer pageIndex, Integer pageSize);

    /**
     * 添加用户
     * @param sysUser
     * @return
     */
    public Boolean add(SysUser sysUser);

    /**
     * 根据用户ID查询用户详情
     * @param id
     * @return
     */
    public SysUser getUserById(@Param("id") Integer id);

    /**
     * 修改用户信息
     * @param sysUser
     * @return
     */
    public Boolean getUpdateUserId(SysUser sysUser);
}
